<div id="<%=type.to_s%>s">
  <table id="<%=type.to_s%>_list" class="data">
    <thead>
      <tr>
        <th class="name first" colspan="2">
          <div class="dividers">
            <a href="">航班/火车</a>
          </div>
        </th>
        <th>
          <div class="dividers">
            <a href="">票号</a>
          </div>
        </th>
        <th>
          <div class="dividers">
            <a href="">时间</a>
          </div>
        </th>
        <th class="block_status last" colspan="2">操作</th>
      </tr>
    </thead>
    <tbody>
      <%if type==:arrive%>
        <%event.arrife.each do |trip|%>
          <%=render :partial=>'trips/trip_item',:locals=>{:trip=>trip}%>
        <%end%>
      <%else%>
        <%event.reverts.each do |trip|%>
          <%=render :partial=>'trips/trip_item',:locals=>{:trip=>trip}%>
        <%end%>
      <%end%>
    </tbody>
  </table>
  <br/>
  <div style="float:right">
    <a href="#" onclick="Element.toggle('<%=type.to_s%>_fieldset');return false">
      <span>添加<%=message%>信息</span>
    </a>
  </div>
  <br/>
  <br/>
  <fieldset id="<%=type.to_s%>_fieldset"  style="display:none">
    <legend>添加<%=message%>信息</legend>
    <%remote_form_for type,:url=>{:controller=>'trips',:action=>"create_#{type.to_s}"},:html=>{:id=>"#{type.to_s}_form"} do |f|%>
      <div id="errors" style="display:none">
      </div>
      <br/>
      <%=hidden_field_tag 'event',event.id%>
        <%=f.label :ticket_category,"类型:"%><%=f.select :ticket_category,%w{航班 车次}%><br clear="all"/>
        <%=f.label :ticket_number,"票号:"%><%=f.text_field :ticket_number%><br clear="all"/>
        <%=f.label :occurs_on,"时间:"%><%=f.datetime_select :occurs_on%> <br clear="all"/>
        <%= f.submit "添加#{message}信息",:class=>'submit'%>
    <%end%>
  </fieldset>
</div>